import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import './assets/fonts/iconfont.css'
import { Icon, Tabbar, TabbarItem, Swipe, SwipeItem, Grid, GridItem, PullRefresh, List, Loading, NavBar, GoodsAction, GoodsActionIcon, GoodsActionButton, Popup, Card, Stepper, Button, Form, Field, Checkbox, SwipeCell, SubmitBar, Sidebar, SidebarItem, AddressEdit, AddressList, ContactCard, Search, Lazyload } from 'vant'
import './assets/css/base.css'
import loading from '../src/plugins/loading'
Vue.use(loading)

Vue.config.productionTip = false
const loadingImg = require('../src/assets/imgs/1.jpg')
Vue.use(Icon)
  .use(Tabbar)
  .use(TabbarItem)
  .use(Swipe)
  .use(SwipeItem)
  .use(Grid)
  .use(GridItem)
  .use(PullRefresh)
  .use(List)
  .use(Loading)
  .use(NavBar)
  .use(GoodsAction)
  .use(GoodsActionIcon)
  .use(GoodsActionButton)
  .use(Popup)
  .use(Card)
  .use(Stepper)
  .use(Button)
  .use(Form)
  .use(Field)
  .use(Checkbox)
  .use(SwipeCell)
  .use(SubmitBar)
  .use(Sidebar)
  .use(SidebarItem)
  .use(AddressEdit)
  .use(AddressList)
  .use(ContactCard)
  .use(Search)
  .use(Lazyload, {
    loading: loadingImg,
    error: '',
    preload: '1'
  })

Vue.config.productionTip = false

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
